\(\int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx\) [22]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 12 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=\frac {1}{b (a+b \cot (x))} \]

[Out]

1/b/(a+b*cot(x))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3587, 32} \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=\frac {1}{b (a+b \cot (x))} \]

[In]

Int[Csc[x]^2/(a + b*Cot[x])^2,x]

[Out]

1/(b*(a + b*Cot[x]))

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 3587

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {1}{(a+x)^2} \, dx,x,b \cot (x)\right )}{b} \\ & = \frac {1}{b (a+b \cot (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.42 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=\frac {\sin (x)}{b (b \cos (x)+a \sin (x))} \]

[In]

Integrate[Csc[x]^2/(a + b*Cot[x])^2,x]

[Out]

Sin[x]/(b*(b*Cos[x] + a*Sin[x]))

Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {1}{b \left (a +b \cot \left (x \right )\right )}\) \(13\)
default \(\frac {1}{b \left (a +b \cot \left (x \right )\right )}\) \(13\)
risch \(-\frac {2 i}{\left (i b \,{\mathrm e}^{2 i x}+a \,{\mathrm e}^{2 i x}+i b -a \right ) \left (i b +a \right )}\) \(38\)

[In]

int(csc(x)^2/(a+b*cot(x))^2,x,method=_RETURNVERBOSE)

[Out]

1/b/(a+b*cot(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (12) = 24\).

Time = 0.28 (sec) , antiderivative size = 39, normalized size of antiderivative = 3.25 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=-\frac {a \cos \left (x\right ) - b \sin \left (x\right )}{{\left (a^{2} b + b^{3}\right )} \cos \left (x\right ) + {\left (a^{3} + a b^{2}\right )} \sin \left (x\right )} \]

[In]

integrate(csc(x)^2/(a+b*cot(x))^2,x, algorithm="fricas")

[Out]

-(a*cos(x) - b*sin(x))/((a^2*b + b^3)*cos(x) + (a^3 + a*b^2)*sin(x))

Sympy [F]

\[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=\int \frac {\csc ^{2}{\left (x \right )}}{\left (a + b \cot {\left (x \right )}\right )^{2}}\, dx \]

[In]

integrate(csc(x)**2/(a+b*cot(x))**2,x)

[Out]

Integral(csc(x)**2/(a + b*cot(x))**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=\frac {1}{{\left (b \cot \left (x\right ) + a\right )} b} \]

[In]

integrate(csc(x)^2/(a+b*cot(x))^2,x, algorithm="maxima")

[Out]

1/((b*cot(x) + a)*b)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=-\frac {1}{{\left (a \tan \left (x\right ) + b\right )} a} \]

[In]

integrate(csc(x)^2/(a+b*cot(x))^2,x, algorithm="giac")

[Out]

-1/((a*tan(x) + b)*a)

Mupad [B] (verification not implemented)

Time = 12.37 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.17 \[ \int \frac {\csc ^2(x)}{(a+b \cot (x))^2} \, dx=-\frac {1}{\mathrm {tan}\left (x\right )\,a^2+b\,a} \]

[In]

int(1/(sin(x)^2*(a + b*cot(x))^2),x)

[Out]

-1/(a^2*tan(x) + a*b)